<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /*
        0.每个函数都有两个属性
            -prototype : 不可枚举
            -length  : 传入参数的个数,...不算
            -apply :
            -call:
            -bind
     */
    function sayName(name) {
    }
    function sayName2(name,...args){
    }

    console.log(sayName.length) // 1
    console.log(sayName2.length) // 1
    
    // 1. call apply强大的地方
    window.color = 'red'
    let o = {
        color:'blue'
    }
    function sayColor() {
        console.log(this.color)
    }
    sayColor.call(window)  // red
    sayColor.call(o)  // blue
</script>
</body>
</html>